home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Devices / NuBus⁄Slot Manager / ROM Build⁄Download 3.2.4 / -Read Me next >
Encoding:
Text File  |  1995-05-25  |  4.3 KB  |  97 lines  |  [TEXT/MPS ]

  1. 05/25/95
  2.  
  3. The tools in this folder may make it easier to build declaration ROM images and then  
  4. download those images to a ROM programmer.  The tools in this folder are described below.
  5.  
  6.  
  7.  
  8. CHANGES TO ROM BUILD/DOWNLOAD FOLDER
  9. ------------------------------------
  10.  
  11. 05/25/95:  • Resubmitted to developer CD (9/16/92 version off CD somehow?)
  12.            • changed version of ROM Build/Download folder from 3.2.3 to 3.2.4 <mb>
  13.  
  14. 10/29/92:  • Changed -Read Me memo: Further clarified the need to run the CRCPatch tool on the 
  15.              full-sized (i.e. FINAL) ROM image.  This is described in the CRCPatch section below. <mb>
  16.  
  17. 09/16/92:  • The -Read Me memo changed: I added the calling syntax, further clarified the need to 
  18.              run the tools: CRCPatch first, then Data. <mb>
  19.            • Incorporated bug fixes in CRCPatch.c, Data.c that caused potential bus errors in
  20.              32 bit mode. <mb>
  21.            • Incorporated fix in CRCCalc.a to properly calculate CRCs in ROMs greater than 64K in
  22.              size. Thanks to PG! <mb>
  23.  
  24. 07/31/92:  • The -Read Me memo has been simplified, because the Designing Cards and Drivers book
  25.              contains the Slot Manager and ROM concepts that were in the earlier memo.  <mb> 
  26.  
  27.  
  28.  
  29. TOOL DESCRIPTIONS/NOTES
  30. -----------------------
  31.  
  32.  
  33.  
  34. 1.  CRCPATCH
  35.  
  36. Calling syntax from the MPW shell: CRCPatch filename 
  37.  
  38. Run the CRCPatch tool after assembling and linking your declaration ROM source files, so that code 
  39. segment 1 is an image of the declaration ROM.  (There will be a code 0 segment, but this tool 
  40. doesn't look at it, and the "Data" tool explained below removes it for you).  
  41.  
  42. The tool calculates the CRC value of code segment 1 of the specified file, and patches the CRC 
  43. value into the proper position in code segment 1 (where it would be in the format header block).
  44.  
  45. CRCPatch calculates the crc value using this algorithm:
  46.  
  47.     Start pointer at bottom of ROM (top of ROM - length)
  48.     Initialize sum to 0 (sum will be the CRC value)
  49.     @1  Rotate sum left by one bit (with ROL.L #1 instruction)
  50.         If pointer is pointing to CRC field in format header, goto @2 (i.e. don't count CRC field)
  51.         Get a byte
  52.         Add byte to sum
  53.     @2  Increment pointer to next data byte
  54.     Goto @1 until done
  55.  
  56. IMPORTANT:  You MUST run CRCPatch on the "real" ROM image (which should be your CODE 1 resource after 
  57. assembling and linking).  That is, your CODE 1 resource must be the same size as your final ROM, and
  58. must contain ALL the data (including padding zeroes between the format header block and the lower
  59. part of your ROM).  CRCPatch will stamp the CRC value into the proper space in your format block.
  60.  
  61. We had a situation where a developer was using a large ROM (64K) but only assembled and linked a
  62. smaller ROM (3K), figuring he could fill his ROM programmer's buffer with zeroes and overlay the 
  63. directory, sResource structures, and format header information into the correct places in the buffer.  
  64.  
  65. But, in his case, the CRCPatch Tool will only do about 3,000 rotates in its CRC calculation loop
  66. (because it gets its size from the size of the CODE 1 resource), whereas the Macintosh startup code 
  67. will do 64K rotates when it scans the card (because the ROMLength will be 64K).  And the CRC value
  68. the startup code generates won't match that of the ROM - resulting in an smBLFieldBad error -309 (bad 
  69. bytelanes value, which is returned for both bad bytelanes values and bad checksums).
  70.  
  71.  
  72.  
  73. 2.  DATA TOOL
  74.  
  75. Calling syntax from the MPW shell: Data ResourceFileName DataFileName
  76.  
  77. The Data tool opens ResourceFileName, strips off the code 0 segment, and puts the code 1 segment in a 
  78. file named DataFileName.  The resulting data file can then be downloaded to a ROM programmer.  
  79. Run the Data tool after doing the CRCPatch.
  80.  
  81. A typical build sequence would be something like:
  82.  
  83.     BuildProgram myDeclROM            # Assemble, link declaration ROM.  The resulting resource 
  84.                                       #  file will contain code segments 0 and 1.
  85.     CRCPatch myDeclROM                # Calculate CRC on code segment 1 and patch value into code 1.
  86.     Data myDeclROM Final.ROM.Image    # Copy code segment 1 into data file, creating final ROM image.
  87.  
  88.  
  89.  
  90. 3.  TJS COMM APPLICATION
  91.  
  92. The tjs comm application is a rudimentary data comm program.  It can be used to download a
  93. data file to a ROM programmer.  The letters TJS are the initials of the engineer who wrote the program.
  94.  
  95.  
  96. END
  97.